#ifndef __TEMP__
#define __TEMP__
#include"show.cc"
#endif

void Print(const vector<int>& vt)
{
    cout << "[";
    for (auto& e : vt)
    {
        cout << e << ",";
    }
    cout << "]" << endl;
}

void Test(const vector<int>& nums, int target, int num)
{
    vector<int> ret = Solution().twoSum(nums, target);
    if (ret.size() != 2 || ret[0] == ret[1] || ret[0] > nums.size() - 1 || ret[1] > nums.size() - 1)
    {
        goto END;
    }

    if (nums[ret[0]] + nums[ret[1]] == target)
    {
        cout << "示例" << num << "通过！" << endl;
        return;
    }
    else
    {
        goto END;
    }

    END:
    cout << "示例" << num << "未通过, 输出：";
    Print(ret);
}

int main()
{
    Test({2,7,11,15}, 9, 1);
    Test({3,2,4}, 6, 2);
    Test({3,3}, 6, 3);
    return 0;
}
